<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('材料规格列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>物料类别：</label>
                                <select name="typeName" >
                                	<option value="">-----全选-----</option>
					                <option th:each="dict : ${typelis}" th:text="${dict.name}" th:value="${dict.name}"></option>
					            </select>
                            </li>
                            <li>
                                <label>物料名称：</label>
                                <input type="text" name="mingc"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "gcgl/material";

        $(function() {
            var options = {
                url: prefix + "/jjxglist",
                updateUrl: prefix + "/detail/{id}",
                modalName: "基价",
                sortName: "updateat desc",
                sortOrder: "",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'id',
                    title: '主键',
                    visible: false
                },
                {
                    field: 'typeName',
                    title: '物料类别',
                },
                {
                    field: 'typebh',
                    title: '物料编号',
                },
                {
                    field: 'mingc',
                    title: '物料名称',
                    width: '200px'
                },
                {
                    field: 'clpp',
                    title: '物料品牌',
                },
                {
                    field: 'guig',
                    title: '规格型号',
                    width: '400px'
                },
                {
                    field: 'danw',
                    title: '单位',
                },
                {
                    field: 'zdjine',
                    title: '系统指导价（不含税）'
                },
                {
                    field: 'memo',
                    title: '备注',
                    visible: false
                },
                {
                    field: 'updateUser',
                    title: '更新人'
                },
                {
                    field: 'updateAt',
                    title: '更新时间'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.editTab(\'' + row.id + '\')"><i class="fa fa-infor"></i>查看</a> ');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>